#include<msp430g2231.h>
void main(void)
 {
   WDTCTL=WDT_MDLY_32;   //set the watchdog Timer Interval to ~30ms
   IE1|=WDTIE;          //Enable WDT Interrupt
   P1DIR=0X01;        //set P1.0 output direction 
   _bis_SR_register(LPM0_bits+GIE);//Enter LPM0 w/ interrupt
 }
//watchdog timer interrupt service routine
#pragma vector=WDT_VECTOR
__interrupt void watchdog_timer(void)
{
  P1OUT^=0x01; //toggle P1.0 using Ex-or
}


